home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
012
/
quickies.arc
/
YN.DOC
< prev
Wrap
Text File
|
1987-03-17
|
625b
|
23 lines
YN - Get a yes (Y) or no (N) response from the user.
This program will send the prompt with (Y/N)? appended to the terminal and
wait for the user to press Y or N (upper or lower case), no other key
accepted. Upon exit, ERRORLEVEL is set to 0 if N was pressed, or
ERRORLEVEL is set to 1 if Y was pressed.
Call: YN <prompt>
Example:
YN Should I continue
IF ERRORLEVEL 1 THEN GOTO :YPRESSED
IF ERRORLEVEL 0 THEN GOTO :NPRESSED
In the above, the program would display:
Should I continue (Y/N)?
Entered and debugged by Dave Rich from MS-DOS Power User's Guide